Skip to content

Conversation

@coco3427
Copy link

Fixed missing Python code issue

There was an active code section where the Python code was incomplete. I used the c++ code to create an equivalent in Python.

code was checked by @Austing767

Copy link
Owner

@pearcej pearcej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, but this is a C++ text, so all Python code is only intended as pseudocode, so needs to be embedded in a main function and then called when needed. Without this students tend to create global variables and use other bad practices in their code. Please see any other Python code in the book for an example.

@coco3427
Copy link
Author

@pearcej I fixed the code to follow the best practices you mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants